<template>
  <div class="header">
      <van-nav-bar
      title="登录页面"
      left-text="返回"
      right-text="Register"
      left-arrow
      @click-left="onClickLeft"
      @click-right="onClickRight"
    />
    {{msgFather.aa}}
  </div>
</template>

<script>
// @ is an alias to /src
export default {
  name: 'headers',
  components: {
    
  },
  props:['msgFather'],
  data(){
    return{
      loadtime:0,
      loading:""
    }
  },
  mounted(){
    var $th =this;
    console.log(this.msgFather);
    console.log("执行了1")
    this.$emit('child-msg',{bb:45});
    setTimeout(function(){
       $th.$toast.clear();
    },3000)
  }
  ,
    methods: {
    onClickLeft() {
      // this.$toast('返回');
     this.loading = this.$toast.loading({
      message: '加载中...',
      forbidClick: true,
      duration:this.loadtime
    });
    },
    onClickRight() {
       this.$router.push('/register')
      // Toast('按钮');
    }
  }
}
</script>